Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allows utilities easy mode for Knative Injection #1658

Merged
merged 1 commit into from
Aug 28, 2020

Conversation

n3wscott
Copy link
Contributor

Adding an easy entry method next to sharedmain to allow for utilities to leverage injection without being a controller.

Example usage in chaos duck.

… to leverage injection without being a controller.
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Aug 27, 2020
@knative-prow-robot knative-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 27, 2020
Copy link
Contributor

@vagababov vagababov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 27, 2020
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: n3wscott, vagababov

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 27, 2020
@n3wscott
Copy link
Contributor Author

/retest

@n3wscott
Copy link
Contributor Author

/retest

wish I could run those tests locally...

@vagababov
Copy link
Contributor

You should be able to

/cc @evankanderson

@knative-prow-robot knative-prow-robot merged commit 2335e4d into knative:master Aug 28, 2020
// Start the injection clients and informers.
logging.FromContext(ctx).Info("Starting informers...")
go func(ctx context.Context) {
if err := controller.StartInformers(ctx.Done(), informers...); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change broke reconcilers that set non-default resyncPeriod values because it starts informers before the controllers are set up. Attempting to set the resyncPeriod is ignored and the informer code logs this warning message:

resyncPeriod 300000000000 is smaller than resyncCheckPeriod 36000000000000 and the informer has already started. Changing it to 36000000000000

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this is just generally broken. Without the controllers created the informer events won't be set up and the controllers won't properly resync things on startup. This is likely masked by the resync we get when we are promoted to leader, but generally informers should not be started until we're done setting up events.

@n3wscott @vagababov What was the motivation for this change? What will rolling it back in the release branch break?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@grantr we should probably make sure that we have test coverage of the scenario where you folks got broken so that we don't make a similar regression in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

anyone working on fixing this or should I try?
@grantr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants